package cn.kgc.spring.day03.statik;

import cn.kgc.spring.day03.service.TeacherService;
import cn.kgc.spring.day03.service.impl.TeacherServiceImpl;

/**
 * @author 课工场
 * @date 2024/11/6
 * @description   该类是TeacherServiceImpl的静态代理类
 */
public class TeacherServiceImplStaticProxy implements TeacherService {

    private TeacherService teacherService = new TeacherServiceImpl();

    @Override
    public String teachOnLine(String course, String account) {

        System.out.println("上课时间到了,请开始上课...");

        String s = teacherService.teachOnLine(course, account);

        System.out.println("下课时间到了,请准时下课...");

        return s;
    }

    @Override
    public String teachOffLine(String course, Integer classRoom) {

        System.out.println("上课时间到了,请开始上课...");

        String s = teacherService.teachOffLine(course, classRoom);

        System.out.println("下课时间到了,请准时下课...");

        return s;
    }
}
